<%= error_messages_for 'machine' %>

	<div class=section_title>
		<h3 style="width:175">Overview</h3>
	</div>
	
	<div class=section>
		<div class=spacer>&nbsp;</div>
		<b style="padding-left: 10px"><u><%= link_to 'Categories', :controller => 'categories', :action => 'list' %></u>:</b>
		<ul>
			<% total_in_cat = 0 %>
			<li><%= link_to 'View All', :controller => 'machines', :action => 'list' %> [ <b><%= Machine.count %></b> ]</li>
			<% unless Category.name_size_hash.nil? %>
				<% Category.name_size_hash.sort.each do |key, value| %>
					<li><%= link_to key, :controller => 'machines', :action => 'list', :list_cat => key %> [ <b><%= value %></b> ]</li>
				<% end %>
			<% else %>
				<% for category in @all_categories %>
					<li><%= link_to category, :controller => 'machines', :action => 'list_by_category', :list_cat => category %> [ <b>?</b> ]</li>
				<% end %>
			<% end %>
			<!-- member function to find total not in category -->
			<li><%= link_to 'Unknown', :controller => 'machines', :action => 'list', :list_cat => 'Unknown' %> [ <b><%= Machine.num_wo_cat %></b> ]</li>
		</ul>
		<div class=spacer>&nbsp;</div>
	</div>